<include file="header" />
<body js="wapjs/setting">
<div class="wraper">
	<div id="head-ortrait">

		<div class="head clearfix">
			<a href="#" data="{BEESCRM::U('/Base/UserCenter/index',array('account_id'=>$accountId))}" class="iconfont icon-zuo pull-left getBack"></a>
			<span class="head-name pull-left">个人设置</span>
			<a href="#" class="pull-right text-right save" id="complete" url="{BEESCRM::U('base/UserCenter/set',array('account_id'=>$accountId))}"></a>
		</div>

		<div class="container">
			<div class="lists" id="portrait-wraper1" >
				<div class="tb-mode">
					<p class="tb-cell">头像</p>
					<div class="tb-cell user-head text-right">
						<if condition="$userInfo['logo']">
							<img src="{BEESCRM:$userInfo.logo}"/>
						<elseif condition="$userInfo['avatar']" />
								<img src="{BEESCRM:$userInfo.avatar}"/>
						<else/>
							<img src="/assets/images/headimg.jpg"/>
						</if>
					</div>
				</div>
				<input type="file" id="file" class="upload-img" value="">
			</div>
			<div class="lists" id="portrait-wraper" style="display:none;">
				<div class="tb-mode">
					<p class="tb-cell">头像</p>
					<div class="tb-cell user-head text-right">
						<if condition="$userInfo['logo']">
							<img src="{BEESCRM:$userInfo.logo}"/>
						<elseif condition="$userInfo['avatar']" />
								<img src="{BEESCRM:$userInfo.avatar}"/>
						<else/>
							<img src="/assets/images/headimg.jpg"/>
						</if>
					</div>
				</div>
				<input type="file"  class="upload-img" name="upload-img" id="upload-img" />
				<input type="hidden" name="picture_url" id="picture_url" value="" />
			</div>

			<div class="lists" id="changename">
				<div class="tb-mode">
					<p class="tb-cell">用户名</p>
					<p class="tb-cell text-right">
						<span class="cur_user">{BEESCRM:$userInfo.nickname}</span>
						<input id="user_name" placeholder="请输入新的用户名" value="{BEESCRM:$userInfo.nickname}" />
					</p>
				</div>
			</div>

			<div class="lists" id="changemobile">
				<div class="tb-mode">
					<p class="tb-cell">手机号码</p>
					<p class="tb-cell text-right">
					<span class="cur_mobile">{BEESCRM:$userInfo.mobile}</span>
					<div class="form-list mobile_hide" style="display:none;border:0px;padding:0px">
						<input placeholder="请输入您的手机号码" name="mobile" id="mobile" value="{BEESCRM:$userInfo.mobile}"/>
					</div>

					</p>
				</div>
			</div>
			<!--<div class="lists mobile_hide" style="display: none;">
				<div class="tb-mode">
					<p class="tb-cell">验证码</p>
					<p class="tb-cell text-right">
						<div class="form-list clearfix" style="border:0px;padding:0px">
								<input class="mobile" placeholder="请输入验证码" name="verify" id="verify"/>
								<a href="javascript:void(0);" class="btn mobile" id="btn_verify" url="{BEESCRM::U('base/User/getCode',array('account_id'=>$accountId))}">获取验证码</a>
						</div>
					</p>
				</div>
			</div>-->

		</div>

	</div>
	<div class="photoClip" id="photoClip">
		<div class="head clearfix">
			<a href="#" class="iconfont icon-zuo pull-left"></a>
			<span class="head-name pull-left">个人设置</span>
			<a href="#" class="pull-right text-right save" id="edit-btn" url="{BEESCRM::U('base/UserCenter/generatePicture',array('account_id'=>$accountId))}">完成</a>
		</div>

		<!--图片加载-->
		<div id="photoClip-wrapper">
			<div class="lazy_tip" id="lazy_tip"><span>1%</span><br>	载入中......</div>
			<div class="lazy_cover"></div>
			<div class="pic_edit">
				<div id="clipArea"></div>
			</div>
			<img src="" fileName="" id="hit">
		</div>

	</div>
</div>
<script type="text/javascript" src="/assets/base/userCenter/modules/sea.js"></script>
<!--
<script type="text/javascript" src="/assets/base/userCenter/modules/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.ui.widget.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.fileupload.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.iframe-transport.js"></script>

-->

<script enter="/assets/base/userCenter/static/publicjs/public" id="confnode" async="async" src="/assets/base/userCenter/static/publicjs/config.js"></script>
<!--<script>
	/*seajs.use("$",function() {*/
		$("#upload-img").fileupload({
			url: "/base/common/upload",//文件上传地址，当然也可以直接写在input的data-url属性内
			formData: {param1: "p1", param2: "p2"},//如果需要额外添加参数可以在这里添加
			done: function (e, result) {
				var data = $.parseJSON(result.result);
				if (data.status == 'S') {
					$('#picture_url').attr('picture_url',data.url);
					$('.user-head img').attr('src',data.url);
					$.ajax({
						type: "Post",
						url: "{BEESCRM::U('/Base/UserCenter/updateLogo',array('account_id'=>$accountId))}",
						data: {url:data.url},
						dataType: "json",
						success: function(data){
							if(data.status == 'S') {
								fm.alert(data.message);
								
							} else {
								fm.alert(data.message)
							}
						}
					});
				} else {
					fm.alert(data.message)
				}
			}
		});
/*})*/
</script>-->
</body>
</html>